AgentHost - store pull request information on the server#322607
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds server-side persistence and propagation of GitHub / pull request metadata for Agent Host sessions, so clients (notably the Sessions/Agents UI) can render PR affordances based on session state rather than re-deriving everything client-side.
Changes:
- Introduces a typed GitHub state payload (
ISessionGitHubState) stored under session summary_meta, plus helpers to read/write it. - Persists GitHub state (including
pullRequestUrl) into the session database and overlays it into session list results. - Updates PR operation and sessions provider logic to use the new summary-meta GitHub state (and updates tests accordingly).
Show a summary per file
| File | Description |
|---|---|
| src/vs/sessions/contrib/providers/agentHost/test/browser/localAgentHostSessionsProvider.test.ts | Skips a GitHub/PR-related recompute regression test (needs updating/replacement). |
| src/vs/sessions/contrib/providers/agentHost/browser/baseAgentHostSessionsProvider.ts | Switches GitHub/PR info derivation to summary meta + live PR model icon computation. |
| src/vs/platform/agentHost/test/node/agentHostPullRequestOperationProvider.test.ts | Updates PR operation provider tests for new dependencies; removes an outdated test. |
| src/vs/platform/agentHost/test/node/agentHostPullRequestOperationHandler.test.ts | Updates expected “PR created” events to carry PR URL and seeds summary GitHub coords. |
| src/vs/platform/agentHost/test/node/agentHostChangesetOperationService.test.ts | Updates test git-state service stub for new GitHub-state APIs. |
| src/vs/platform/agentHost/node/agentService.ts | Overlays persisted GitHub state into listed sessions and live summary/meta overlays. |
| src/vs/platform/agentHost/node/agentHostSyncOperationProvider.ts | Adapts to optional gitState in operation contexts. |
| src/vs/platform/agentHost/node/agentHostStateManager.ts | Adds setSessionSummaryMeta and includes summary _meta in notification diffs. |
| src/vs/platform/agentHost/node/agentHostPullRequestOperationProvider.ts | Hides PR ops when a PR URL exists; writes PR URL into persisted GitHub state. |
| src/vs/platform/agentHost/node/agentHostPullRequestOperationHandler.ts | Reads GitHub coordinates from summary meta for PR creation flow; emits PR URL. |
| src/vs/platform/agentHost/node/agentHostGitStateService.ts | Persists git + GitHub state into session DB; loads GitHub state into summary meta. |
| src/vs/platform/agentHost/node/agentHostDiscardChangesOperationProvider.ts | Adapts to optional gitState in operation contexts. |
| src/vs/platform/agentHost/node/agentHostCommitOperationProvider.ts | Adapts to optional gitState in operation contexts. |
| src/vs/platform/agentHost/node/agentHostChangesetOperationService.ts | Extends operation updates to include GitHub state in the operation context. |
| src/vs/platform/agentHost/common/state/sessionState.ts | Adds GitHub summary-meta types/keys and read/write helpers. |
| src/vs/platform/agentHost/common/agentService.ts | Extends session metadata to include _summaryMeta. |
| src/vs/platform/agentHost/common/agentHostGitStateService.ts | Adds get/set APIs for persisted GitHub state. |
| src/vs/platform/agentHost/common/agentHostChangesetOperationService.ts | Makes gitState optional and adds gitHubState to operation contexts. |
Copilot's findings
- Files reviewed: 18/18 changed files
- Comments generated: 6
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
dmitrivMS
approved these changes
Jun 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.